package com.work;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class test {

    @Test
    public void test(){
        ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");
        Controller c = (Controller) ac.getBean("controller");
        c.select();

    }

    @Test
    public void test1(){
        ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");
        Dog c = (Dog) ac.getBean("dog1");
        System.out.println(c);
    }

    @Test
    public void test2(){
        ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");
        Service c = (Service) ac.getBean("service");
        c.select();
    }

    @Test
    public void test3(){
        ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");
        MyUtil c = (MyUtil) ac.getBean("myUtil");
        System.out.println(c);
    }
}
